package com.price.util

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.content.pm.PackageInstaller
import com.price.common.extend.logWarn


class InstallResultReceiver : BroadcastReceiver() {
    override fun onReceive(context: Context?, intent: Intent?) {

        val status =
            intent?.getIntExtra(PackageInstaller.EXTRA_STATUS, PackageInstaller.STATUS_FAILURE)
        val packName =
            intent?.getStringExtra(PackageInstaller.EXTRA_PACKAGE_NAME)
        logWarn("InstallResultReceiver: $status  packName:$packName")
        if (status == PackageInstaller.STATUS_SUCCESS) {
        }
    }
}